#ifndef __BASE_SCENE_H__
#define __BASE_SCENE_H__

#include "cocos2d.h"
using namespace cocos2d;

#define BASE_SCENE(__TYPE__) \
	static CCScene* scene() \
{ \
	CCScene *scene = CCScene::create(); \
	__TYPE__ *pRet = new __TYPE__(); \
	if (pRet && pRet->init()) \
	{ \
		pRet->autorelease(); \
		scene->addChild(pRet); \
		return scene; \
	} \
	else \
	{ \
		delete pRet; \
		pRet = NULL; \
		return NULL; \
	} \
}

class BaseScene : public CCLayer
{
public:
	CREATE_FUNC(BaseScene);	
private:
};

#endif